
public class CreateImmutable {
	private int i;
	CreateImmutable(int i)
	{
		this.i=i;
	}
	public CreateImmutable modify(int i)
	{
		if(this.i==i)
			return this;
		else
			return new CreateImmutable(i);
	}
	public static void main(String[] args) {
		CreateImmutable c=new CreateImmutable(10);
		CreateImmutable c1=c.modify(100);
		System.out.println(c1==c);
		CreateImmutable c3=c.modify(10);
		System.out.println(c==c3);
		Boolean b=new Boolean("vgfg");
		System.out.println(b);
	}

}
